package com.pet.user.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "用户注册表单")
public class RegisterFormDTO {
    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = "用户名")
    @Pattern(regexp = "^[a-zA-Z0-9]+$", message = "用户名不能包含特殊字符!")
    private String username;
    @ApiModelProperty(value = "电话号码", required = true)
    @NotBlank(message = "电话号码")
    private String phone;
    @ApiModelProperty(value = "密码", required = true)
    @NotBlank(message = "密码")
    private String password;
    @ApiModelProperty(value = "确认密码", required = true)
    @NotBlank(message = "确认密码")
    private String confirmPassword;
}
